3.2.6 \(\int \sin (e+f x) (a+b \tan ^2(e+f x))^{3/2} \, dx\) [106]

Optimal. Leaf size=113 \[ \frac {3 (a-b) \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 f}+\frac {3 b \sec (e+f x) \sqrt {a-b+b \sec ^2(e+f x)}}{2 f}-\frac {\cos (e+f x) \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}{f} \]

[Out]

-cos(f*x+e)*(a-b+b*sec(f*x+e)^2)^(3/2)/f+3/2*(a-b)*arctanh(sec(f*x+e)*b^(1/2)/(a-b+b*sec(f*x+e)^2)^(1/2))*b^(1
/2)/f+3/2*b*sec(f*x+e)*(a-b+b*sec(f*x+e)^2)^(1/2)/f

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3745, 283, 201, 223, 212} \begin {gather*} \frac {3 b \sec (e+f x) \sqrt {a+b \sec ^2(e+f x)-b}}{2 f}-\frac {\cos (e+f x) \left (a+b \sec ^2(e+f x)-b\right )^{3/2}}{f}+\frac {3 \sqrt {b} (a-b) \tanh ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a+b \sec ^2(e+f x)-b}}\right )}{2 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]*(a + b*Tan[e + f*x]^2)^(3/2),x]

[Out]

(3*(a - b)*Sqrt[b]*ArcTanh[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b + b*Sec[e + f*x]^2]])/(2*f) + (3*b*Sec[e + f*x]*S
qrt[a - b + b*Sec[e + f*x]^2])/(2*f) - (Cos[e + f*x]*(a - b + b*Sec[e + f*x]^2)^(3/2))/f

Rule 201

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^p/(n*p + 1)), x] + Dist[a*n*(p/(n*p + 1)),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 283

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^p/(c*(m + 1
))), x] - Dist[b*n*(p/(c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b, c}, x] &&
IGtQ[n, 0] && GtQ[p, 0] && LtQ[m, -1] &&  !ILtQ[(m + n*p + n + 1)/n, 0] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 3745

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m
 + 1)), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \sin (e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a-b+b x^2\right )^{3/2}}{x^2} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {\cos (e+f x) \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}{f}+\frac {(3 b) \text {Subst}\left (\int \sqrt {a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac {3 b \sec (e+f x) \sqrt {a-b+b \sec ^2(e+f x)}}{2 f}-\frac {\cos (e+f x) \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}{f}+\frac {(3 (a-b) b) \text {Subst}\left (\int \frac {1}{\sqrt {a-b+b x^2}} \, dx,x,\sec (e+f x)\right )}{2 f}\\ &=\frac {3 b \sec (e+f x) \sqrt {a-b+b \sec ^2(e+f x)}}{2 f}-\frac {\cos (e+f x) \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}{f}+\frac {(3 (a-b) b) \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 f}\\ &=\frac {3 (a-b) \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b+b \sec ^2(e+f x)}}\right )}{2 f}+\frac {3 b \sec (e+f x) \sqrt {a-b+b \sec ^2(e+f x)}}{2 f}-\frac {\cos (e+f x) \left (a-b+b \sec ^2(e+f x)\right )^{3/2}}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.43, size = 170, normalized size = 1.50 \begin {gather*} \frac {\left (6 \sqrt {2} (a-b) \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {a+b+(a-b) \cos (2 (e+f x))}}{\sqrt {2} \sqrt {b}}\right ) \cos ^2(e+f x)-2 (a-2 b+(a-b) \cos (2 (e+f x))) \sqrt {a+b+(a-b) \cos (2 (e+f x))}\right ) \sec (e+f x) \sqrt {(a+b+(a-b) \cos (2 (e+f x))) \sec ^2(e+f x)}}{4 \sqrt {2} f \sqrt {a+b+(a-b) \cos (2 (e+f x))}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]*(a + b*Tan[e + f*x]^2)^(3/2),x]

[Out]

((6*Sqrt[2]*(a - b)*Sqrt[b]*ArcTanh[Sqrt[a + b + (a - b)*Cos[2*(e + f*x)]]/(Sqrt[2]*Sqrt[b])]*Cos[e + f*x]^2 -
 2*(a - 2*b + (a - b)*Cos[2*(e + f*x)])*Sqrt[a + b + (a - b)*Cos[2*(e + f*x)]])*Sec[e + f*x]*Sqrt[(a + b + (a
- b)*Cos[2*(e + f*x)])*Sec[e + f*x]^2])/(4*Sqrt[2]*f*Sqrt[a + b + (a - b)*Cos[2*(e + f*x)]])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(358\) vs. \(2(99)=198\).
time = 0.11, size = 359, normalized size = 3.18

method result size
default \(-\frac {\left (\frac {a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b}{\cos \left (f x +e \right )^{2}}\right )^{\frac {3}{2}} \cos \left (f x +e \right ) \left (3 b^{\frac {5}{2}} \ln \left (\frac {2 \sqrt {b}\, \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b}+2 b}{\cos \left (f x +e \right )}\right ) \left (\cos ^{2}\left (f x +e \right )\right )-3 b^{\frac {3}{2}} \ln \left (\frac {2 \sqrt {b}\, \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b}+2 b}{\cos \left (f x +e \right )}\right ) a \left (\cos ^{2}\left (f x +e \right )\right )+\left (a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b \right )^{\frac {3}{2}} a \left (\cos ^{2}\left (f x +e \right )\right )-\left (a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b \right )^{\frac {3}{2}} b \left (\cos ^{2}\left (f x +e \right )\right )-\left (a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b \right )^{\frac {5}{2}}+3 \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b}\, a b \left (\cos ^{2}\left (f x +e \right )\right )-3 \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b}\, b^{2} \left (\cos ^{2}\left (f x +e \right )\right )\right )}{2 f \left (a \left (\cos ^{2}\left (f x +e \right )\right )-\left (\cos ^{2}\left (f x +e \right )\right ) b +b \right )^{\frac {3}{2}} b}\) \(359\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)*(a+b*tan(f*x+e)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

-1/2/f*((a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)/cos(f*x+e)^2)^(3/2)*cos(f*x+e)*(3*b^(5/2)*ln(2*(b^(1/2)*(a*cos(f*x+e
)^2-cos(f*x+e)^2*b+b)^(1/2)+b)/cos(f*x+e))*cos(f*x+e)^2-3*b^(3/2)*ln(2*(b^(1/2)*(a*cos(f*x+e)^2-cos(f*x+e)^2*b
+b)^(1/2)+b)/cos(f*x+e))*a*cos(f*x+e)^2+(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)^(3/2)*a*cos(f*x+e)^2-(a*cos(f*x+e)^2
-cos(f*x+e)^2*b+b)^(3/2)*b*cos(f*x+e)^2-(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)^(5/2)+3*(a*cos(f*x+e)^2-cos(f*x+e)^2
*b+b)^(1/2)*a*b*cos(f*x+e)^2-3*(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)^(1/2)*b^2*cos(f*x+e)^2)/(a*cos(f*x+e)^2-cos(f
*x+e)^2*b+b)^(3/2)/b

________________________________________________________________________________________

Maxima [A]
time = 0.52, size = 186, normalized size = 1.65 \begin {gather*} -\frac {4 \, \sqrt {a - b + \frac {b}{\cos \left (f x + e\right )^{2}}} {\left (a - b\right )} \cos \left (f x + e\right ) - \frac {2 \, {\left (a b - b^{2}\right )} \sqrt {a - b + \frac {b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{{\left (a - b + \frac {b}{\cos \left (f x + e\right )^{2}}\right )} \cos \left (f x + e\right )^{2} - b} + \frac {3 \, {\left (a b - b^{2}\right )} \log \left (\frac {\sqrt {a - b + \frac {b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) - \sqrt {b}}{\sqrt {a - b + \frac {b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + \sqrt {b}}\right )}{\sqrt {b}}}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)*(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="maxima")

[Out]

-1/4*(4*sqrt(a - b + b/cos(f*x + e)^2)*(a - b)*cos(f*x + e) - 2*(a*b - b^2)*sqrt(a - b + b/cos(f*x + e)^2)*cos
(f*x + e)/((a - b + b/cos(f*x + e)^2)*cos(f*x + e)^2 - b) + 3*(a*b - b^2)*log((sqrt(a - b + b/cos(f*x + e)^2)*
cos(f*x + e) - sqrt(b))/(sqrt(a - b + b/cos(f*x + e)^2)*cos(f*x + e) + sqrt(b)))/sqrt(b))/f

________________________________________________________________________________________

Fricas [A]
time = 4.69, size = 286, normalized size = 2.53 \begin {gather*} \left [-\frac {3 \, {\left (a - b\right )} \sqrt {b} \cos \left (f x + e\right ) \log \left (-\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} - 2 \, \sqrt {b} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + 2 \, b}{\cos \left (f x + e\right )^{2}}\right ) + 2 \, {\left (2 \, {\left (a - b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{4 \, f \cos \left (f x + e\right )}, -\frac {3 \, {\left (a - b\right )} \sqrt {-b} \arctan \left (\frac {\sqrt {-b} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{b}\right ) \cos \left (f x + e\right ) + {\left (2 \, {\left (a - b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}}}{2 \, f \cos \left (f x + e\right )}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)*(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="fricas")

[Out]

[-1/4*(3*(a - b)*sqrt(b)*cos(f*x + e)*log(-((a - b)*cos(f*x + e)^2 - 2*sqrt(b)*sqrt(((a - b)*cos(f*x + e)^2 +
b)/cos(f*x + e)^2)*cos(f*x + e) + 2*b)/cos(f*x + e)^2) + 2*(2*(a - b)*cos(f*x + e)^2 - b)*sqrt(((a - b)*cos(f*
x + e)^2 + b)/cos(f*x + e)^2))/(f*cos(f*x + e)), -1/2*(3*(a - b)*sqrt(-b)*arctan(sqrt(-b)*sqrt(((a - b)*cos(f*
x + e)^2 + b)/cos(f*x + e)^2)*cos(f*x + e)/b)*cos(f*x + e) + (2*(a - b)*cos(f*x + e)^2 - b)*sqrt(((a - b)*cos(
f*x + e)^2 + b)/cos(f*x + e)^2))/(f*cos(f*x + e))]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}} \sin {\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)*(a+b*tan(f*x+e)**2)**(3/2),x)

[Out]

Integral((a + b*tan(e + f*x)**2)**(3/2)*sin(e + f*x), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 277 vs. \(2 (105) = 210\).
time = 1.42, size = 277, normalized size = 2.45 \begin {gather*} -\frac {1}{2} \, {\left (\frac {3 \, {\left (a b \mathrm {sgn}\left (f\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) - b^{2} \mathrm {sgn}\left (f\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right )\right )} \arctan \left (\frac {\sqrt {a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b}}{\sqrt {-b}}\right )}{\sqrt {-b} f^{2}} + \frac {2 \, {\left (\sqrt {a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b} a \mathrm {sgn}\left (f\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) - \sqrt {a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b} b \mathrm {sgn}\left (f\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right )\right )}}{f^{2}} - \frac {\sqrt {a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b} a b \mathrm {sgn}\left (f\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right ) - \sqrt {a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b} b^{2} \mathrm {sgn}\left (f\right ) \mathrm {sgn}\left (\cos \left (f x + e\right )\right )}{{\left (a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2}\right )} f^{2}}\right )} {\left | f \right |} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)*(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="giac")

[Out]

-1/2*(3*(a*b*sgn(f)*sgn(cos(f*x + e)) - b^2*sgn(f)*sgn(cos(f*x + e)))*arctan(sqrt(a*cos(f*x + e)^2 - b*cos(f*x
 + e)^2 + b)/sqrt(-b))/(sqrt(-b)*f^2) + 2*(sqrt(a*cos(f*x + e)^2 - b*cos(f*x + e)^2 + b)*a*sgn(f)*sgn(cos(f*x
+ e)) - sqrt(a*cos(f*x + e)^2 - b*cos(f*x + e)^2 + b)*b*sgn(f)*sgn(cos(f*x + e)))/f^2 - (sqrt(a*cos(f*x + e)^2
 - b*cos(f*x + e)^2 + b)*a*b*sgn(f)*sgn(cos(f*x + e)) - sqrt(a*cos(f*x + e)^2 - b*cos(f*x + e)^2 + b)*b^2*sgn(
f)*sgn(cos(f*x + e)))/((a*cos(f*x + e)^2 - b*cos(f*x + e)^2)*f^2))*abs(f)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \sin \left (e+f\,x\right )\,{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{3/2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)*(a + b*tan(e + f*x)^2)^(3/2),x)

[Out]

int(sin(e + f*x)*(a + b*tan(e + f*x)^2)^(3/2), x)

________________________________________________________________________________________